package com.chain.BrotherExchange.data.model;

import com.chain.BrotherExchange.R;

import java.util.List;

public class TransferDetailsList extends BaseResponseModel<TransferDetailsList.DataBean> {

    public static class DataBean {
        public DataBean() {
        }

        public DataBean(ListBean list) {

            this.list = list;
        }

        /**
         * list : {"page_index":1,"page_size":10,"total_page":2,"total":11,"items":[{"id":1150702,"token_id":4,"token_name":"SDC","type":10,"num":"200","created_time":1541038315},{"id":1150696,"token_id":4,"token_name":"SDC","type":10,"num":"200","created_time":1541038152},{"id":1150695,"token_id":4,"token_name":"SDC","type":10,"num":"200","created_time":1541038151},{"id":1150694,"token_id":1,"token_name":"USDT","type":10,"num":"100","created_time":1541038035},{"id":1150478,"token_id":3,"token_name":"ETH","type":10,"num":"0.00000006","created_time":1539760451},{"id":1150477,"token_id":4,"token_name":"SDC","type":10,"num":"0.88","created_time":1539760440},{"id":1150476,"token_id":3,"token_name":"ETH","type":10,"num":"0.6646929","created_time":1539760419},{"id":1150475,"token_id":3,"token_name":"ETH","type":10,"num":"1","created_time":1539760404},{"id":1150330,"token_id":4,"token_name":"SDC","type":10,"num":"1","created_time":1539573678},{"id":1150329,"token_id":4,"token_name":"SDC","type":10,"num":"1","created_time":1539573652}]}
         */

        private ListBean list;

        public ListBean getList() {
            return list;
        }

        public void setList(ListBean list) {
            this.list = list;
        }

        public static class ListBean {
            /**
             * page_index : 1
             * page_size : 10
             * total_page : 2
             * total : 11
             * items : [{"id":1150702,"token_id":4,"token_name":"SDC","type":10,"num":"200","created_time":1541038315},{"id":1150696,"token_id":4,"token_name":"SDC","type":10,"num":"200","created_time":1541038152},{"id":1150695,"token_id":4,"token_name":"SDC","type":10,"num":"200","created_time":1541038151},{"id":1150694,"token_id":1,"token_name":"USDT","type":10,"num":"100","created_time":1541038035},{"id":1150478,"token_id":3,"token_name":"ETH","type":10,"num":"0.00000006","created_time":1539760451},{"id":1150477,"token_id":4,"token_name":"SDC","type":10,"num":"0.88","created_time":1539760440},{"id":1150476,"token_id":3,"token_name":"ETH","type":10,"num":"0.6646929","created_time":1539760419},{"id":1150475,"token_id":3,"token_name":"ETH","type":10,"num":"1","created_time":1539760404},{"id":1150330,"token_id":4,"token_name":"SDC","type":10,"num":"1","created_time":1539573678},{"id":1150329,"token_id":4,"token_name":"SDC","type":10,"num":"1","created_time":1539573652}]
             */

            private int page_index;
            private int page_size;
            private int total_page;
            private int total;
            private List<ItemsBean> items;

            public ListBean() {
            }

            public ListBean(List<ItemsBean> items) {

                this.items = items;
            }

            public int getPage_index() {
                return page_index;
            }

            public void setPage_index(int page_index) {
                this.page_index = page_index;
            }

            public int getPage_size() {
                return page_size;
            }

            public void setPage_size(int page_size) {
                this.page_size = page_size;
            }

            public int getTotal_page() {
                return total_page;
            }

            public void setTotal_page(int total_page) {
                this.total_page = total_page;
            }

            public int getTotal() {
                return total;
            }

            public void setTotal(int total) {
                this.total = total;
            }

            public List<ItemsBean> getItems() {
                return items;
            }

            public void setItems(List<ItemsBean> items) {
                this.items = items;
            }

            public static class ItemsBean {
                /**
                 * id : 1150702
                 * token_id : 4
                 * token_name : SDC
                 * type : 10
                 * num : 200
                 * created_time : 1541038315
                 */

                private int id;
                private int token_id;
                private String token_name;
                private int type;
                private String num;
                private int created_time;

                public ItemsBean() {
                }

                public ItemsBean(String token_name, int type, String num, int created_time) {

                    this.token_name = token_name;
                    this.type = type;
                    this.num = num;
                    this.created_time = created_time;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public int getToken_id() {
                    return token_id;
                }

                public void setToken_id(int token_id) {
                    this.token_id = token_id;
                }

                public String getToken_name() {
                    return token_name;
                }

                public void setToken_name(String token_name) {
                    this.token_name = token_name;
                }

                public int getType() {
                    return type;
                }

                public void setType(int type) {
                    this.type = type;
                }

                public String getNum() {
                    return num;
                }

                public void setNum(String num) {
                    this.num = num;
                }

                public int getCreated_time() {
                    return created_time;
                }

                public void setCreated_time(int created_time) {
                    this.created_time = created_time;
                }

                /**
                 * 10划转到法币，11划转到币币
                 */
                public int getTypeText() {

                    switch (type) {
                        case 10:
                            return R.string.transfer_legal_tender;
                        case 11:
                            return R.string.transfer_bitcoins;
                    }

                    return R.string.string_null;
                }
            }
        }
    }
}
